/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.oracleandsxnd.erp.xsd.entity;

import com.oracleandsxnd.erp.common.persistence.DataEntity;
import org.hibernate.validator.constraints.Length;



/**
 * 换货单Entity
 * @author 换货单
 * @version 2019-12-21
 */
public class XsglSaleHDetail extends DataEntity<XsglSaleHDetail> {
	
	private static final long serialVersionUID = 1L;
	private String code;		// 商品编码
	private String name;		// 商品名称
	private String amount;		// 数量
	private String price;		// 单价
	private String totalprice;		// 总价格
	private XsglSaleChange sale;		// 销售单id 父类
	private String cost;		// 成本
	private String profit;		// 利润
	private String company;		// 公司
	
	public XsglSaleHDetail() {
		super();
	}

	public XsglSaleHDetail(String id){
		super(id);
	}

	public XsglSaleHDetail(XsglSaleChange sale){
		this.sale = sale;
	}

	@Length(min=0, max=20, message="商品编码长度必须介于 0 和 20 之间")
	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}
	
	@Length(min=0, max=11, message="商品名称长度必须介于 0 和 11 之间")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@Length(min=0, max=11, message="数量长度必须介于 0 和 11 之间")
	public String getAmount() {
		return amount;
	}

	public void setAmount(String amount) {
		this.amount = amount;
	}
	
	public String getPrice() {
		return price;
	}

	public void setPrice(String price) {
		this.price = price;
	}
	
	public String getTotalprice() {
		return totalprice;
	}

	public void setTotalprice(String totalprice) {
		this.totalprice = totalprice;
	}
	
	@Length(min=0, max=32, message="销售单id长度必须介于 0 和 32 之间")
	public XsglSaleChange getSale() {
		return sale;
	}

	public void setSale(XsglSaleChange sale) {
		this.sale = sale;
	}
	
	public String getCost() {
		return cost;
	}

	public void setCost(String cost) {
		this.cost = cost;
	}
	
	public String getProfit() {
		return profit;
	}

	public void setProfit(String profit) {
		this.profit = profit;
	}
	
	@Length(min=0, max=32, message="公司长度必须介于 0 和 32 之间")
	public String getCompany() {
		return company;
	}

	public void setCompany(String company) {
		this.company = company;
	}
	
}